<?php
// Write paypal error log
function log_my($info, $type = 'default', $ci = false) {
	$info = json_encode($info);

	$log = date('[YmdHis]').' '.$type.' '.( $ci && $ci->uri->segments ? implode('.', $ci->uri->segments): '-')
		.' '.$info.'
';
	write_file(APPPATH.'logs/'.date('Ymd').'.log', $log, FOPEN_WRITE_CREATE);
	return $log;
}
function payment_goods_log($order_id,$info){
	file_put_contents(FCPATH.'log/goods_order_id_'.$order_id, $info);
}
function payment_pingmei_log($order_id,$info){
	file_put_contents(FCPATH.'log/pingmei_zanshang_id_'.$order_id, $info);
}
function payment_article_log($order_id,$info){
	file_put_contents(FCPATH.'log/payment_article_id_'.$order_id, $info);
}
function payment_meinv_log($order_id,$info){
	file_put_contents(FCPATH.'log/payment_meinv_id_'.$order_id, $info);
}
